<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <mate name="viewport" content="width=device-width, initial-scale=1.0"></mate>
    <title>图片分类管理</title>
    <script src="../../static/js/jquery.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../static/css/me.css">

</head>
<body>
    <!--导航-->
    <nav th:replace="_fragments :: admin_menu(4)" class="ui inverted attached segment m-padded-tb-tiny">
        <div class="ui container">
            <div class="ui inverted stackable menu secondary ">
                <h2 class="ui teal header  item">广软社区</h2>
                <a href="#" class=" m-item item m-mobile-hide"><i class="small home icon"></i>博客</a>
                <a href="#" class="m-item item m-mobile-hide"><i class="small idea icon"></i>分类</a>
                <a href="#" class="m-item item m-mobile-hide"><i class="small tags icon"></i>标签</a>
                <div class="right menu m-item m-mobile-hide">
                    <div class="ui dropdown item">
                        <div class="text">
                            <img src="https://picsum.photos/seed/picsum/100/100" alt="" class="ui avatar image">
                            陈炯燏
                        </div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <a href="#" class="item">注销</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <a href="#" class="ui menu toggle black basic inverted m-top-right button m-mobile-show">
            <i class="sidebar icon" style="width: 0.1em"></i>
        </a>
    </nav>

    <!--中间内容-->
    <div class="m-container m-padded-tb-large m-height">
        <div class="ui container">
            <div class="ui success message" th:unless="${#strings.isEmpty(message)}">
                <i class="close icon"></i>
                <div class="header">提示：</div>
                <p>恭喜，操作成功</p>
            </div>
            <h2 class="ui center aligned header">图片分类管理</h2>
            <table class="ui center aligned celled teal table">
                <thead>
                    <tr>
                        <th><a th:href="@{/admin/imageType}" class="ui small  teal basic button"><i class="add small icon"></i>新增</a></th>
                        <th>名称</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each="tag,iterStat : ${page.content}">
                        <td th:text="${iterStat.index+1}">1</td>
                        <td th:text="${tag.name}">java</td>
                        <td>
                            <a href="#" th:href="@{/admin/imageType/{id}/input(id=${tag.id})}" class="ui mini teal basic button">编辑</a>
                            <a href="#" th:href="@{/admin/imageType/{id}/delete(id=${tag.id})}" class="ui mini red basic button">删除</a>
                        </td>
                    </tr>
                </tbody>
                <tfoot th:unless="${page.totalPages}<1">
                    <tr>
                        <th colspan="3">
                            <div class="ui pagination menu">
                                <a href="#" th:href="@{/admin/imageTypeList(page = ${page.number}-1)}" th:unless="${page.first}" class=" item">上一页</a>
                                <a href="#" th:href="@{/admin/imageTypeList(page = ${page.number}+1)}" th:unless="${page.last}" class=" item">下一页</a>
                            </div>
                        </th>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>


    <!--底部footer-->
    <footer th:replace="_fragments :: footer" class="ui inverted vertical segment m-padded-tb-max">
        <div class="ui center aligned container">
            <div class="ui inverted divided stackable grid">
                <div class="three wide column">
                    <div class="ui inverted list">
                        <div class="item">
                            <img src="../../static/images/scanner_picture.jpg" class="ui rounded image" alt="站长二维码" style="width: 120px;">
                        </div>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item" > 用户故事（User Story）</a>
                        <a href="#" class="item" > 用户故事（User Story）</a>
                        <a href="#" class="item" > 用户故事（User Story）</a>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">联系我</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item" > Email:1718707267@qq.com</a>
                        <a href="#" class="item" > QQ:1718707267</a>
                    </div>
                </div>
                <div class="seven wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced ">ChenJionyu</h4>
                    <p class="m-text-thin m-text-spaced m-text-lined m-opacity-mini">这是我的个人博客，会分享关于编程、写作、思考、相关徳任何内容，希望可以给来到这儿的人有所帮助...</p>
                </div>
            </div>
            <div class="ui inverted section divider"></div>
            <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright ©2023 DaiYan Designed by ChenJiongyu </p>
        </div>
    </footer>

    <script>
        $(".menu.toggle").click(function (){
            $(".m-item").toggleClass("m-mobile-hide");
        })
        $(".ui.dropdown").dropdown({
            on:'hover'
        });
        /*点击关闭关闭提示框*/
        $(".message .close").on("click",function () {
            $(this).closest('.message')
            .transition("fade");
        })
    </script>
</body>
</html>